Debian 9 Stretch
Sponsored Link

Command Alias
2017/06/18
 
Set Command Alias for some commands which are often used.
[1] Apply to all users.
root@dlp:~#
vi /etc/profile
# add to the end

alias ll='ls $LS_OPTIONS -l'
alias l='ls $LS_OPTIONS -lA'
alias rm='rm -i'
alias cp='cp -i'
alias mv='mv -i'
# reload

root@dlp:~#
source /etc/profile

[2] Apply to a user. ( a user [stretch] applies for himself )
stretch@dlp:~$
vi .bashrc
# add to the end

alias ll='ls $LS_OPTIONS -l'
alias l='ls $LS_OPTIONS -lA'
alias rm='rm -i'
alias cp='cp -i'
alias mv='mv -i'
stretch@dlp:~$
source .bashrc

 
Tweet